#ifndef _SRV_TIME_TRIGGER_HPP_
#define _SRV_TIME_TRIGGER_HPP_

#include <QtCore/QObject>
#include <QtCore/QTimer>
#include <boost/scoped_ptr.hpp>

/*---------------------------------------------------------------------------*/

namespace ProjectManager
{
	struct Trigger;
}

/*---------------------------------------------------------------------------*/

namespace Server {

	class TriggersRunner;

/*---------------------------------------------------------------------------*/

class TimeTrigger
	:	public QTimer
{
/*---------------------------------------------------------------------------*/

	Q_OBJECT

/*---------------------------------------------------------------------------*/

public:

/*---------------------------------------------------------------------------*/

	TimeTrigger( const ProjectManager::Trigger& _trigegr, TriggersRunner& _runner );

	~TimeTrigger();

	void runTrigger();

/*---------------------------------------------------------------------------*/

private:

/*---------------------------------------------------------------------------*/

	const ProjectManager::Trigger& m_trigger;

	TriggersRunner& m_runner;

/*---------------------------------------------------------------------------*/

public slots:

/*---------------------------------------------------------------------------*/

	void update();

/*---------------------------------------------------------------------------*/

};

/*---------------------------------------------------------------------------*/

} // namespace Server

/*---------------------------------------------------------------------------*/

#endif // _SRV_TRIGGERS_RUNNER_HPP_
